
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>Infrastructure · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="configuration.html" />
    
    
    <link rel="prev" href="command-handlers.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../architecture-overview/">
            
                <a href="../../architecture-overview/">
            
                    
                    Architecture Overview
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../architecture-overview/ddd-cqrs-concepts.html">
            
                <a href="../../architecture-overview/ddd-cqrs-concepts.html">
            
                    
                    DDD & CQRS Concepts
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../architecture-overview/event-sourcing.html">
            
                <a href="../../architecture-overview/event-sourcing.html">
            
                    
                    Event Sourcing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../architecture-overview/event-driven-microservices.html">
            
                <a href="../../architecture-overview/event-driven-microservices.html">
            
                    
                    Event-Driven Microservices
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../axon-server-introduction.html">
            
                <a href="../../axon-server-introduction.html">
            
                    
                    Axon Server
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../release-notes/">
            
                <a href="../../release-notes/">
            
                    
                    Release Notes
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../release-notes/rn-axon-framework/">
            
                <a href="../../release-notes/rn-axon-framework/">
            
                    
                    Axon Framework
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="../../release-notes/rn-axon-framework/rn-af-major-releases.html">
            
                <a href="../../release-notes/rn-axon-framework/rn-af-major-releases.html">
            
                    
                    Major Releases
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="../../release-notes/rn-axon-framework/rn-af-minor-releases.html">
            
                <a href="../../release-notes/rn-axon-framework/rn-af-minor-releases.html">
            
                    
                    Minor Releases
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../release-notes/rn-axon-server/">
            
                <a href="../../release-notes/rn-axon-server/">
            
                    
                    Axon Server
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1" data-path="../../release-notes/rn-axon-server/rn-as-major-releases.html">
            
                <a href="../../release-notes/rn-axon-server/rn-as-major-releases.html">
            
                    
                    Major Releases
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.2" data-path="../../release-notes/rn-axon-server/rn-asse-minor-releases.html">
            
                <a href="../../release-notes/rn-axon-server/rn-asse-minor-releases.html">
            
                    
                    Minor Releases Standard Edition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.3" data-path="../../release-notes/rn-axon-server/rn-as-minor-releases.html">
            
                <a href="../../release-notes/rn-axon-server/rn-as-minor-releases.html">
            
                    
                    Minor Releases Enterprise Edition
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../release-notes/axon-framework-extensions.html">
            
                <a href="../../release-notes/axon-framework-extensions.html">
            
                    
                    Axon Framework Extensions
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Getting Started</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="../../getting-started/quick-start.html">
            
                <a href="../../getting-started/quick-start.html">
            
                    
                    Quick Start
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Axon Framework</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="../introduction.html">
            
                <a href="../introduction.html">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="../messaging-concepts/">
            
                <a href="../messaging-concepts/">
            
                    
                    Messaging Concepts
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.2.1" data-path="../messaging-concepts/anatomy-message.html">
            
                <a href="../messaging-concepts/anatomy-message.html">
            
                    
                    Anatomy of a Message
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.2" data-path="../messaging-concepts/message-correlation.html">
            
                <a href="../messaging-concepts/message-correlation.html">
            
                    
                    Message Correlation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.3" data-path="../messaging-concepts/message-intercepting.html">
            
                <a href="../messaging-concepts/message-intercepting.html">
            
                    
                    Message Intercepting
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.4" data-path="../messaging-concepts/supported-parameters-annotated-handlers.html">
            
                <a href="../messaging-concepts/supported-parameters-annotated-handlers.html">
            
                    
                    Supported Parameters for Annotated Handlers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.5" data-path="../messaging-concepts/exception-handling.html">
            
                <a href="../messaging-concepts/exception-handling.html">
            
                    
                    Exception Handling
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2.6" data-path="../messaging-concepts/unit-of-work.html">
            
                <a href="../messaging-concepts/unit-of-work.html">
            
                    
                    Unit of Work
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="./">
            
                <a href="./">
            
                    
                    Commands
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1" data-path="modeling/">
            
                <a href="modeling/">
            
                    
                    Modeling
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.3.1.1" data-path="modeling/aggregate.html">
            
                <a href="modeling/aggregate.html">
            
                    
                    Aggregate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.1.2" data-path="modeling/multi-entity-aggregates.html">
            
                <a href="modeling/multi-entity-aggregates.html">
            
                    
                    Multi-Entity Aggregates
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.1.3" data-path="modeling/state-stored-aggregates.html">
            
                <a href="modeling/state-stored-aggregates.html">
            
                    
                    State Stored Aggregates
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.1.4" data-path="modeling/aggregate-creation-from-another-aggregate.html">
            
                <a href="modeling/aggregate-creation-from-another-aggregate.html">
            
                    
                    Aggregate Creation from another Aggregate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.1.5" data-path="modeling/aggregate-polymorphism.html">
            
                <a href="modeling/aggregate-polymorphism.html">
            
                    
                    Aggregate Polymorphism
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.1.6" data-path="modeling/conflict-resolution.html">
            
                <a href="modeling/conflict-resolution.html">
            
                    
                    Conflict Resolution
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.3.2" data-path="command-dispatchers.html">
            
                <a href="command-dispatchers.html">
            
                    
                    Command Dispatchers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.3" data-path="command-handlers.html">
            
                <a href="command-handlers.html">
            
                    
                    Command Handlers
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="3.3.4" data-path="infrastructure.html">
            
                <a href="infrastructure.html">
            
                    
                    Infrastructure
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.3.5" data-path="configuration.html">
            
                <a href="configuration.html">
            
                    
                    Configuration
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="../events/">
            
                <a href="../events/">
            
                    
                    Events
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.4.1" data-path="../events/event-dispatchers.html">
            
                <a href="../events/event-dispatchers.html">
            
                    
                    Event Dispatchers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.2" data-path="../events/event-handlers.html">
            
                <a href="../events/event-handlers.html">
            
                    
                    Event Handlers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.3" data-path="../events/event-processors/">
            
                <a href="../events/event-processors/">
            
                    
                    Event Processors
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.4.3.1" data-path="../events/event-processors/subscribing.html">
            
                <a href="../events/event-processors/subscribing.html">
            
                    
                    Subscribing Event Processors
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.3.2" data-path="../events/event-processors/streaming.html">
            
                <a href="../events/event-processors/streaming.html">
            
                    
                    Streaming Event Processors
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.4.4" data-path="../events/event-bus-and-event-store.html">
            
                <a href="../events/event-bus-and-event-store.html">
            
                    
                    Event Bus & Event Store
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.5" data-path="../events/event-versioning.html">
            
                <a href="../events/event-versioning.html">
            
                    
                    Event Versioning
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.4.6" data-path="../events/event-serialization.html">
            
                <a href="../events/event-serialization.html">
            
                    
                    Event Serialization
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="../queries/">
            
                <a href="../queries/">
            
                    
                    Queries
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.5.1" data-path="../queries/query-processing.html">
            
                <a href="../queries/query-processing.html">
            
                    
                    Query Processing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.2" data-path="../queries/query-dispatchers.html">
            
                <a href="../queries/query-dispatchers.html">
            
                    
                    Query Dispatchers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.3" data-path="../queries/query-handlers.html">
            
                <a href="../queries/query-handlers.html">
            
                    
                    Query Handlers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.4" data-path="../queries/implementations.html">
            
                <a href="../queries/implementations.html">
            
                    
                    Implementations
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.5.5" data-path="../queries/configuration.html">
            
                <a href="../queries/configuration.html">
            
                    
                    Configuration
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="../sagas/">
            
                <a href="../sagas/">
            
                    
                    Sagas
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.6.1" data-path="../sagas/implementation.html">
            
                <a href="../sagas/implementation.html">
            
                    
                    Implementation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.2" data-path="../sagas/associations.html">
            
                <a href="../sagas/associations.html">
            
                    
                    Associations
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.6.3" data-path="../sagas/infrastructure.html">
            
                <a href="../sagas/infrastructure.html">
            
                    
                    Infrastructure
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="../deadlines/">
            
                <a href="../deadlines/">
            
                    
                    Deadlines
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.7.1" data-path="../deadlines/deadline-managers.html">
            
                <a href="../deadlines/deadline-managers.html">
            
                    
                    Deadline Managers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.7.2" data-path="../deadlines/event-schedulers.html">
            
                <a href="../deadlines/event-schedulers.html">
            
                    
                    Event Schedulers
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="../testing/">
            
                <a href="../testing/">
            
                    
                    Testing
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.8.1" data-path="../testing/commands-events.html">
            
                <a href="../testing/commands-events.html">
            
                    
                    Commands / Events
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.8.2" data-path="../testing/sagas-1.html">
            
                <a href="../testing/sagas-1.html">
            
                    
                    Sagas
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="../tuning/">
            
                <a href="../tuning/">
            
                    
                    Tuning
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.9.1" data-path="../tuning/event-snapshots.html">
            
                <a href="../tuning/event-snapshots.html">
            
                    
                    Event Snapshots
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.9.2" data-path="../tuning/event-processing.html">
            
                <a href="../tuning/event-processing.html">
            
                    
                    Event Processing
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.9.3" data-path="../tuning/command-processing.html">
            
                <a href="../tuning/command-processing.html">
            
                    
                    Command Processing
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="../monitoring-and-metrics.html">
            
                <a href="../monitoring-and-metrics.html">
            
                    
                    Monitoring and Metrics
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.11" data-path="../spring-boot-integration.html">
            
                <a href="../spring-boot-integration.html">
            
                    
                    Spring Boot Integration
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.12" data-path="../modules.html">
            
                <a href="../modules.html">
            
                    
                    Modules
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Axon Server</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="../../axon-server/introduction.html">
            
                <a href="../../axon-server/introduction.html">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="../../axon-server/installation/">
            
                <a href="../../axon-server/installation/">
            
                    
                    Installation
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.1" data-path="../../axon-server/installation/local-installation/">
            
                <a href="../../axon-server/installation/local-installation/">
            
                    
                    Local Installation
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.1.1" data-path="../../axon-server/installation/local-installation/axon-server-se.html">
            
                <a href="../../axon-server/installation/local-installation/axon-server-se.html">
            
                    
                    Axon Server SE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2.1.2" data-path="../../axon-server/installation/local-installation/axon-server-ee.html">
            
                <a href="../../axon-server/installation/local-installation/axon-server-ee.html">
            
                    
                    Axon Server EE
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.2.2" data-path="../../axon-server/installation/docker-k8s/">
            
                <a href="../../axon-server/installation/docker-k8s/">
            
                    
                    Docker / K8s
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.2.2.1" data-path="../../axon-server/installation/docker-k8s/axon-server-se.html">
            
                <a href="../../axon-server/installation/docker-k8s/axon-server-se.html">
            
                    
                    Axon Server SE
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2.2.2" data-path="../../axon-server/installation/docker-k8s/axon-server-ee.html">
            
                <a href="../../axon-server/installation/docker-k8s/axon-server-ee.html">
            
                    
                    Axon Server EE
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="../../axon-server/administration/">
            
                <a href="../../axon-server/administration/">
            
                    
                    Administration
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.3.1" data-path="../../axon-server/administration/admin-configuration/">
            
                <a href="../../axon-server/administration/admin-configuration/">
            
                    
                    Configuration
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.3.1.1" data-path="../../axon-server/administration/admin-configuration/configuration.html">
            
                <a href="../../axon-server/administration/admin-configuration/configuration.html">
            
                    
                    System Properties
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.1.2" data-path="../../axon-server/administration/admin-configuration/command-line-interface.html">
            
                <a href="../../axon-server/administration/admin-configuration/command-line-interface.html">
            
                    
                    Command Line Interface
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.1.3" data-path="../../axon-server/administration/admin-configuration/rest-api.html">
            
                <a href="../../axon-server/administration/admin-configuration/rest-api.html">
            
                    
                    REST API
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.3.2" data-path="../../axon-server/administration/monitoring/">
            
                <a href="../../axon-server/administration/monitoring/">
            
                    
                    Monitoring
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.3.2.1" data-path="../../axon-server/administration/monitoring/actuator-endpoints.html">
            
                <a href="../../axon-server/administration/monitoring/actuator-endpoints.html">
            
                    
                    Actuator Endpoints
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.2.2" data-path="../../axon-server/administration/monitoring/grpc-metrics.html">
            
                <a href="../../axon-server/administration/monitoring/grpc-metrics.html">
            
                    
                    gRPC Metrics
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.2.3" data-path="../../axon-server/administration/monitoring/heartbeat-monitoring.html">
            
                <a href="../../axon-server/administration/monitoring/heartbeat-monitoring.html">
            
                    
                    Heartbeat Monitoring
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.3.3" data-path="../../axon-server/administration/clustering.html">
            
                <a href="../../axon-server/administration/clustering.html">
            
                    
                    Clusters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.4" data-path="../../axon-server/administration/replication-groups.html">
            
                <a href="../../axon-server/administration/replication-groups.html">
            
                    
                    Replication Groups
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.5" data-path="../../axon-server/administration/multi-context.html">
            
                <a href="../../axon-server/administration/multi-context.html">
            
                    
                    Multi-Context
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.6" data-path="../../axon-server/administration/tagging.html">
            
                <a href="../../axon-server/administration/tagging.html">
            
                    
                    Tagging
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.7" data-path="../../axon-server/administration/backup-and-messaging-only-nodes.html">
            
                <a href="../../axon-server/administration/backup-and-messaging-only-nodes.html">
            
                    
                    Backup and Messaging-only Nodes
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.8" data-path="../../axon-server/administration/backups.html">
            
                <a href="../../axon-server/administration/backups.html">
            
                    
                    Backups
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.9" data-path="../../axon-server/administration/recovery.html">
            
                <a href="../../axon-server/administration/recovery.html">
            
                    
                    Recovery
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.10" data-path="../../axon-server/administration/plugins.html">
            
                <a href="../../axon-server/administration/plugins.html">
            
                    
                    Plugins
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3.11" data-path="../../axon-server/administration/error-codes.html">
            
                <a href="../../axon-server/administration/error-codes.html">
            
                    
                    Error Codes
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="../../axon-server/security/">
            
                <a href="../../axon-server/security/">
            
                    
                    Security
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.4.1" data-path="../../axon-server/security/ssl.html">
            
                <a href="../../axon-server/security/ssl.html">
            
                    
                    SSL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.2" data-path="../../axon-server/security/access-control.html">
            
                <a href="../../axon-server/security/access-control.html">
            
                    
                    Access Control
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.3" data-path="../../axon-server/security/access-control-se.html">
            
                <a href="../../axon-server/security/access-control-se.html">
            
                    
                    Access Control - Standard Edition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.4" data-path="../../axon-server/security/access-control-ee.html">
            
                <a href="../../axon-server/security/access-control-ee.html">
            
                    
                    Access Control - Enterprise Edition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.5" data-path="../../axon-server/security/access-control-clients.html">
            
                <a href="../../axon-server/security/access-control-clients.html">
            
                    
                    Access Control - Client Applications
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.6" data-path="../../axon-server/security/access-control-cli.html">
            
                <a href="../../axon-server/security/access-control-cli.html">
            
                    
                    Access Control - CLI
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.7" data-path="../../axon-server/security/access-control-api.html">
            
                <a href="../../axon-server/security/access-control-api.html">
            
                    
                    Access Control - API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.8" data-path="../../axon-server/security/access-control-ldap.html">
            
                <a href="../../axon-server/security/access-control-ldap.html">
            
                    
                    Access Control - LDAP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4.9" data-path="../../axon-server/security/access-control-oauth2.html">
            
                <a href="../../axon-server/security/access-control-oauth2.html">
            
                    
                    Access Control - OAuth 2.0
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="../../axon-server/performance/">
            
                <a href="../../axon-server/performance/">
            
                    
                    Performance
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.5.1" data-path="../../axon-server/performance/tuning-event-processing.html">
            
                <a href="../../axon-server/performance/tuning-event-processing.html">
            
                    
                    Event Segments
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.5.2" data-path="../../axon-server/performance/flow-control.html">
            
                <a href="../../axon-server/performance/flow-control.html">
            
                    
                    Flow Control
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="../../axon-server/migration/">
            
                <a href="../../axon-server/migration/">
            
                    
                    Migration
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.6.1" data-path="../../axon-server/migration/standard-to-enterprise-edition.html">
            
                <a href="../../axon-server/migration/standard-to-enterprise-edition.html">
            
                    
                    Standard to Enterprise Edition
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.6.2" data-path="../../axon-server/migration/non-axon-server-to-axon-server.html">
            
                <a href="../../axon-server/migration/non-axon-server-to-axon-server.html">
            
                    
                    Non-Axon Server to Axon Server
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    
        
        <li class="header">Extensions</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="../../extensions/spring-amqp.html">
            
                <a href="../../extensions/spring-amqp.html">
            
                    
                    Spring AMQP
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="../../extensions/jgroups.html">
            
                <a href="../../extensions/jgroups.html">
            
                    
                    JGroups
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="../../extensions/kafka.html">
            
                <a href="../../extensions/kafka.html">
            
                    
                    Kafka
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="../../extensions/kotlin.html">
            
                <a href="../../extensions/kotlin.html">
            
                    
                    Kotlin
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="../../extensions/mongo.html">
            
                <a href="../../extensions/mongo.html">
            
                    
                    Mongo
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="../../extensions/reactor/reactor.html">
            
                <a href="../../extensions/reactor/reactor.html">
            
                    
                    Reactor
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.6.1" data-path="../../extensions/reactor/reactive-gateways/reactive-gateways.html">
            
                <a href="../../extensions/reactor/reactive-gateways/reactive-gateways.html">
            
                    
                    Reactor Gateways
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5.7" data-path="../../extensions/spring-cloud.html">
            
                <a href="../../extensions/spring-cloud.html">
            
                    
                    Spring Cloud
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="../../extensions/tracing.html">
            
                <a href="../../extensions/tracing.html">
            
                    
                    Tracing
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">Appendices</li>
        
        
    
        <li class="chapter " data-level="6.1" data-path="../../appendices/rdbms-tuning.html">
            
                <a href="../../appendices/rdbms-tuning.html">
            
                    
                    A. RDBMS Tuning
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2" data-path="../../appendices/message-handler-tuning/">
            
                <a href="../../appendices/message-handler-tuning/">
            
                    
                    B. Message Handler Tuning
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="6.2.1" data-path="../../appendices/message-handler-tuning/parameter-resolvers.html">
            
                <a href="../../appendices/message-handler-tuning/parameter-resolvers.html">
            
                    
                    Parameter Resolvers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.2.2" data-path="../../appendices/message-handler-tuning/handler-enhancers.html">
            
                <a href="../../appendices/message-handler-tuning/handler-enhancers.html">
            
                    
                    Handler Enhancers
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6.3" data-path="../../appendices/meta-annotations.html">
            
                <a href="../../appendices/meta-annotations.html">
            
                    
                    C. Meta Annotations
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.4" data-path="../../appendices/identifier-generation.html">
            
                <a href="../../appendices/identifier-generation.html">
            
                    
                    D. Identifier Generation
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="6.5" data-path="../../appendices/query-reference.html">
            
                <a href="../../appendices/query-reference.html">
            
                    
                    E. Axon Server Query Language
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >Infrastructure</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="infrastructure">Infrastructure</h1>
<p>Command dispatching, as exemplified in the <a href="command-dispatchers.html">Dispatching Commands</a> page, has a number of advantages. 
Firstly, it constructs an object that clearly describes the intent of the client. 
By logging the command, you store both the intent and the related data for future reference. 
Command handling also makes it easy to expose your command processing components to remote clients, via web services for example. </p>
<p>Testing also becomes a lot easier. 
You could define test scripts by just defining the starting situation (given), command to execute (when) and expected results (then) by listing a number of events and commands (see <a href="../testing/commands-events.html">Testing</a> for more on this).</p>
<p>The last major advantage is that it is very easy to switch between synchronous and asynchronous, as well as local versus distributed command processing.</p>
<p>This does not mean command dispatching using explicit command objects is the only way to do it. The goal of Axon is not to prescribe a specific way of working, but to support you doing it your way, while providing best practices as the default behavior. It is still possible to use a service layer that you can invoke to execute commands. The method will just need to start a unit of work (see <a href="../messaging-concepts/unit-of-work.html">Unit of Work</a>) and perform a commit or rollback on it when the method is finished.</p>
<p>The next sections provide an overview of the tasks related to setting up a command dispatching infrastructure with the Axon Framework.
The API-friendlier <a href="#the-command-gateway"><code>CommandGateway</code></a> is mentioned, as well as the <code>CommandBus</code> in both a <a href="#the-command-bus---local">local</a> and <a href="#the-command-bus---distributed">distributed</a> environment. </p>
<h2 id="the-command-gateway">The Command Gateway</h2>
<p>The Command Gateway is a convenient interface towards the command dispatching mechanism. While you are not required to use a gateway to dispatch commands, it is generally the easiest option to do so.</p>
<p>There are two ways to use a Command Gateway. The first is to use the <code>CommandGateway</code> interface and the <code>DefaultCommandGateway</code> implementation provided by Axon. The command gateway provides a number of methods that allow you to send a command and wait for a result either synchronously, with a timeout or asynchronously.</p>
<p>The other option is perhaps the most flexible of all. You can turn almost any interface into a command gateway using the <code>CommandGatewayFactory</code>. This allows you to define your application&apos;s interface using strong typing and declaring your own (checked) business exceptions. Axon will automatically generate an implementation for that interface at runtime.</p>
<h3 id="configuring-the-command-gateway">Configuring the Command Gateway</h3>
<p>Both your custom Command Gateway and the one provided by Axon need to at least be configured with a Command Bus. In addition, the Command Gateway can be configured with a <code>RetryScheduler</code>, <code>CommandDispatchInterceptor</code>s, and <code>CommandCallback</code>s.</p>
<p><strong>RetryScheduler</strong></p>
<p>The <code>RetryScheduler</code> is capable of scheduling retries when command execution has failed. When a command fails due to an exception that is explicitly non-transient, no retries are done at all. Note that the retry scheduler is only invoked when a command fails due to a <code>RuntimeException</code>. Checked exceptions are regarded as a &quot;business exception&quot; and will never trigger a retry.</p>
<p>Currently, two implementations exist:</p>
<ol>
<li><p>The <code>IntervalRetryScheduler</code> will retry a given command at set intervals until it succeeds,</p>
<p>or a maximum number of retries has taken place.</p>
</li>
<li><p>The <code>ExponentialBackOffIntervalRetryScheduler</code> retries failed commands with an exponential back-off interval until</p>
<p>it succeeds, or a maximum number of retries has taken place.</p>
</li>
</ol>
<p><strong>CommandDispatchInterceptor</strong></p>
<p><code>CommandDispatchInterceptor</code>s allow modification of <code>CommandMessage</code>s prior to dispatching them to the Command Bus. In contrast to <code>CommandDispatchInterceptor</code>s configured on the Command Bus, these interceptors are only invoked when messages are sent through this Gateway. For example, these interceptors could be used to attach metadata to a command or perform validation.</p>
<p><strong>CommandCallback</strong></p>
<p>A <code>CommandCallback</code> can be provided to the Command Gateway upon a regular <code>send</code>, specifying what to do with the command handling result. It works with the <code>CommandMessage</code> and <code>CommandResultMessage</code> classes, thus allowing for some generic behavior for all Commands sent through this gateway regardless of their type.</p>
<h3 id="creating-a-custom-command-gateway">Creating a custom Command Gateway</h3>
<p>Axon allows a custom interface to be used as a command gateway. The behavior of each method declared in the interface is based on the parameter types, return type and declared exception. Using this gateway is not only convenient, it makes testing a lot easier by allowing you to mock your interface where needed.</p>
<p>This is how parameters affect the behavior of the command gateway:</p>
<ul>
<li>The first parameter is expected to be the actual command object to dispatch.</li>
<li>Parameters annotated with <code>@MetaDataValue</code> will have their value assigned to the metadata field with the identifier passed as annotation parameter</li>
<li><p>Parameters of type <code>MetaData</code> will be merged with the <code>MetaData</code> on the <code>CommandMessage</code>.</p>
<p>Metadata defined by latter parameters will overwrite the metadata of earlier parameters, if their key is equal.</p>
</li>
<li><p>Parameters of type <code>CommandCallback</code> will have their <code>onResult(CommandMessage&lt;? extends C&gt;, CommandResultMessage&lt;? extends R&gt;)</code> invoked after the command has been handled.
Although the <code>CommandCallback</code> provides a means to deal with the result of command handling, this is no impact on whether you can define a return type on the custom command gateway.
In case both a callback and return type are defined, the invocations of the callback will always match with the return value (or exception).
Lastly, know that you may pass in several <code>CommandCallback</code> instances, which all will be invoked in order. </p>
</li>
<li><p>The last two parameters indicate a timeout and may be of types <code>long</code> (or <code>int</code>) and <code>TimeUnit</code>.</p>
<p>The method will block at most as long as these parameters indicate. How the method reacts to a timeout depends on the exceptions declared on the method (see below).</p>
<p>Note that if other properties of the method prevent blocking altogether, a timeout will never occur.</p>
</li>
</ul>
<p>The declared return value of a method will also affect its behavior:</p>
<ul>
<li>A <code>void</code> return type will cause the method to return immediately, unless there are other indications on the method that one would want to wait, such as a timeout or declared exceptions.</li>
<li><p>Return types of <code>Future</code>, <code>CompletionStage</code> and <code>CompletableFuture</code> will cause the method to return immediately.</p>
<p>You can access the result of the command handler using the <code>CompletableFuture</code> instance returned from the method.</p>
<p>Exceptions and timeouts declared on the method are ignored.</p>
</li>
<li><p>Any other return type will cause the method to block until a result is available.</p>
<p>The result is cast to the return type (causing a <code>ClassCastException</code> if the types do not match).</p>
</li>
</ul>
<p>Exceptions have the following effect:</p>
<ul>
<li><p>Any declared checked exception will be thrown if the command handler (or an interceptor) threw an exception of that type.</p>
<p>If a checked exception is thrown that has not been declared, it is wrapped in a <code>CommandExecutionException</code>, which is a <code>RuntimeException</code>.</p>
</li>
<li><p>When a timeout occurs, the default behavior is to return <code>null</code> from the method.</p>
<p>This can be changed by declaring a <code>TimeoutException</code>.</p>
<p>If this exception is declared, a <code>TimeoutException</code> is thrown instead.</p>
</li>
<li><p>When a thread is interrupted while waiting for a result, the default behavior is to return null.</p>
<p>In that case, the interrupted flag is set back on the thread.</p>
<p>By declaring an <code>InterruptedException</code> on the method, this behavior is changed to throw that exception instead.</p>
<p>The interrupt flag is removed when the exception is thrown, consistent with the java specification.</p>
</li>
<li><p>Other runtime exceptions may be declared on the method, but will not have any effect other than clarification to the API user.</p>
</li>
</ul>
<p>Finally, there is the possibility to use annotations:</p>
<ul>
<li><p>As specified in the parameter section, the <code>@MetaDataValue</code> annotation on a parameter will have the value of that parameter added as metadata value.</p>
<p>The key of the metadata entry is provided as parameter to the annotation.</p>
</li>
<li><p>Methods annotated with <code>@Timeout</code> will block at most the indicated amount of time.</p>
<p>This annotation is ignored if the method declares timeout parameters.</p>
</li>
<li><p>Classes annotated with <code>@Timeout</code> will cause all methods declared in that class to block at most the indicated amount of time, unless they are annotated with their own <code>@Timeout</code> annotation or specify timeout parameters.</p>
</li>
</ul>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">interface</span> <span class="hljs-title">MyGateway</span> </span>{

    <span class="hljs-comment">// fire and forget</span>
    <span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">sendCommand</span><span class="hljs-params">(MyPayloadType command)</span></span>;

    <span class="hljs-comment">// method that attaches metadata and will wait for a result for 10 seconds</span>
    <span class="hljs-meta">@Timeout</span>(value = <span class="hljs-number">10</span>, unit = TimeUnit.SECONDS)
    <span class="hljs-function">ReturnValue <span class="hljs-title">sendCommandAndWaitForAResult</span><span class="hljs-params">(MyPayloadType command,
                                             @MetaDataValue(<span class="hljs-string">&quot;userId&quot;</span>)</span> String userId)</span>;

    <span class="hljs-comment">// alternative that throws exceptions on timeout</span>
    <span class="hljs-meta">@Timeout</span>(value = <span class="hljs-number">20</span>, unit = TimeUnit.SECONDS)
    <span class="hljs-function">ReturnValue <span class="hljs-title">sendCommandAndWaitForAResult</span><span class="hljs-params">(MyPayloadType command)</span>
                         <span class="hljs-keyword">throws</span> TimeoutException, InterruptedException</span>;

    <span class="hljs-comment">// this method will also wait, caller decides how long</span>
    <span class="hljs-function"><span class="hljs-keyword">void</span> <span class="hljs-title">sendCommandAndWait</span><span class="hljs-params">(MyPayloadType command, <span class="hljs-keyword">long</span> timeout, TimeUnit unit)</span>
                         <span class="hljs-keyword">throws</span> TimeoutException, InterruptedException</span>;
}

<span class="hljs-comment">// To configure a gateway:</span>
CommandGatewayFactory factory = CommandGatewayFactory.builder()
                                                     .commandBus(commandBus)
                                                     .build();
<span class="hljs-comment">// note that the commandBus can be obtained from the Configuration</span>
<span class="hljs-comment">// object returned on `configurer.initialize()`.</span>
MyGateway myGateway = factory.createGateway(MyGateway.class);
</code></pre>
<h2 id="the-command-bus---local">The Command Bus - Local</h2>
<p>The local command bus is the mechanism that dispatches commands to their respective command handlers within an Axon application. 
Suggestions on how to use the <code>CommandBus</code> can be found <a href="command-dispatchers.html#the-command-bus">here</a>. 
Several flavors of the command bus, with differing characteristics, exist within the framework.</p>
<h3 id="simplecommandbus">SimpleCommandBus</h3>
<p>The <code>SimpleCommandBus</code> is, as the name suggests, the simplest implementation. It does straightforward processing of commands in the thread that dispatches them. After a command is processed, the modified aggregate(s) are saved and generated events are published in that same thread. In most scenarios, such as web applications, this implementation will suit your needs.</p>
<p>Like most <code>CommandBus</code> implementations, the <code>SimpleCommandBus</code> allows interceptors to be configured. <code>CommandDispatchInterceptor</code>s are invoked when a command is dispatched on the command bus. The <code>CommandHandlerInterceptor</code>s are invoked before the actual command handler method is, allowing you to do modify or block the command. See <a href="../messaging-concepts/message-intercepting.html#command-interceptors">Command Interceptors</a> for more information.</p>
<p>Since all command processing is done in the same thread, this implementation is limited to the JVM&apos;s boundaries. The performance of this implementation is good, but not extraordinary. To cross JVM boundaries, or to get the most out of your CPU cycles, check out the other <code>CommandBus</code> implementations.</p>
<p> tabs 
 tab title=&quot;Axon Configuration API&quot; </p>
<pre><code class="lang-java">Configurer configurer =
    DefaultConfigurer.defaultConfiguration()
                     .configureCommandBus(
                        c -&gt; SimpleCommandBus.builder()
                                             .transactionManager(c.getComponent(TransactionManager.class))
                                             .messageMonitor(c.messageMonitor(SimpleCommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
                                             .build()
                     );
</code></pre>
<p> endtab </p>
<p> tab title=&quot;Spring Boot AutoConfiguration&quot; </p>
<pre><code class="lang-java"><span class="hljs-meta">@Bean</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> SimpleCommandBus <span class="hljs-title">commandBus</span><span class="hljs-params">(TransactionManager txManager, AxonConfiguration axonConfiguration)</span> </span>{
    SimpleCommandBus commandBus =
            SimpleCommandBus.builder()
                            .transactionManager(txManager)
                            .messageMonitor(axonConfiguration.messageMonitor(CommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
                            .build();
    commandBus.registerHandlerInterceptor(
            <span class="hljs-keyword">new</span> CorrelationDataInterceptor&lt;&gt;(axonConfiguration.correlationDataProviders())
    );
    <span class="hljs-keyword">return</span> commandBus;
}
</code></pre>
<p> endtab 
 endtabs </p>
<h3 id="asynchronouscommandbus">AsynchronousCommandBus</h3>
<p>As the name suggest, the <code>AsynchronousCommandBus</code> implementation executes commands asynchronously from the thread that dispatches them. It uses an <code>Executor</code> to perform the actual handling logic on a different Thread.</p>
<p>By default, the <code>AsynchronousCommandBus</code> uses an unbounded cached thread pool. This means a thread is created when a command is dispatched. Threads that have finished processing a command are reused for new commands. Threads are stopped if they have not processed a command for 60 seconds.</p>
<p>Alternatively, an <code>Executor</code> instance may be provided to configure a different threading strategy.</p>
<p>Note that the <code>AsynchronousCommandBus</code> should be shut down when stopping the application, to make sure any waiting threads are properly shut down. To shut down, call the <code>shutdown()</code> method. This will also shutdown any provided <code>Executor</code> instance, if it implements the <code>ExecutorService</code> interface.</p>
<p> tabs 
 tab title=&quot;Axon Configuration API&quot; </p>
<pre><code class="lang-java">Configurer configurer = DefaultConfigurer.defaultConfiguration()
            .configureCommandBus(c -&gt; AsynchronousCommandBus.builder().transactionManager(c.getComponent(TransactionManager.class))
            .messageMonitor(c.messageMonitor(AsynchronousCommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
            .build());
</code></pre>
<p> endtab </p>
<p> tab title=&quot;Spring Boot AutoConfiguration&quot; </p>
<pre><code class="lang-java"><span class="hljs-meta">@Bean</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> AsynchronousCommandBus <span class="hljs-title">commandBus</span><span class="hljs-params">(TransactionManager txManager, AxonConfiguration axonConfiguration)</span> </span>{
    AsynchronousCommandBus commandBus =
            AsynchronousCommandBus.builder()
                            .transactionManager(txManager)
                            .messageMonitor(axonConfiguration.messageMonitor(AsynchronousCommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
                            .build();
    commandBus.registerHandlerInterceptor(<span class="hljs-keyword">new</span> CorrelationDataInterceptor&lt;&gt;(axonConfiguration.correlationDataProviders()));
    <span class="hljs-keyword">return</span> commandBus;
}
</code></pre>
<p> endtab 
 endtabs </p>
<h3 id="disruptorcommandbus">DisruptorCommandBus</h3>
<p>The <code>SimpleCommandBus</code> has reasonable performance characteristics. The fact that the <code>SimpleCommandBus</code> needs locking to prevent multiple threads from concurrently accessing the same aggregate causes processing overhead and lock contention.</p>
<p>The <code>DisruptorCommandBus</code> takes a different approach to multithreaded processing. Instead of having multiple threads each doing the same process, there are multiple threads, each taking care of a piece of the process. The <code>DisruptorCommandBus</code> uses the <a href="http://lmax-exchange.github.io/disruptor/" target="_blank">Disruptor</a>, a small framework for concurrent programming, to achieve much better performance, by just taking a different approach to multi-threading. Instead of doing the processing in the calling thread, the tasks are handed off to two groups of threads, that each take care of a part of the processing. The first group of threads will execute the command handler, changing an aggregate&apos;s state. The second group will store and publish the events to the event store.</p>
<p>While the <code>DisruptorCommandBus</code> easily outperforms the <code>SimpleCommandBus</code> by a factor of 4(!), there are a few limitations:</p>
<ul>
<li><p>The <code>DisruptorCommandBus</code> only supports event sourced aggregates.</p>
<p>This Command Bus also acts as a Repository for the aggregates processed by the Disruptor.</p>
<p>To get a reference to the Repository, use <code>createRepository(AggregateFactory)</code>.</p>
</li>
<li><p>A command can only result in a state change in a single aggregate instance.</p>
</li>
<li><p>When using a cache, it allows only a single aggregate for a given identifier.</p>
<p>This means it is not possible to have two aggregates of different types with the same identifier.</p>
</li>
<li><p>Commands should generally not cause a failure that requires a rollback of the unit of work.</p>
<p>When a rollback occurs, the <code>DisruptorCommandBus</code> cannot guarantee that commands are processed in the order they were dispatched.</p>
<p>Furthermore, it requires a retry of a number of other commands, causing unnecessary computations.</p>
</li>
<li><p>When creating a new aggregate instance, commands updating that created instance may not all happen in the exact order as provided.</p>
<p>Once the aggregate is created, all commands will be executed exactly in the order they were dispatched.</p>
<p>To ensure the order, use a callback on the creating command to wait for the aggregate being created.</p>
<p>It shouldn&apos;t take more than a few milliseconds.</p>
</li>
</ul>
<p>To construct a <code>DisruptorCommandBus</code> instance, you need an <code>EventStore</code>. This component is explained in the <a href="../events/event-bus-and-event-store.html">Event Bus and Event Store</a> section.</p>
<p>Optionally, you can provide a <code>DisruptorConfiguration</code> instance, which allows you to tweak the configuration to optimize performance for your specific environment:</p>
<ul>
<li><p><code>Buffer size</code> - the number of slots on the ring buffer to register incoming commands.</p>
<p>Higher values may increase throughput, but also cause higher latency. Must always be a power of 2. Defaults to 4096.</p>
</li>
<li><p><code>ProducerType</code> - indicates whether the entries are produced by a single thread, or multiple. Defaults to multiple.</p>
</li>
<li><p><code>WaitStrategy</code> - the strategy to use when the processor threads (the three threads taking care of the actual processing) need to wait for each other.</p>
<p>The best wait strategy depends on the number of cores available in the machine, and the number of other processes running.</p>
<p>If low latency is crucial, and the <code>DisruptorCommandBus</code> may claim cores for itself, you can use the <code>BusySpinWaitStrategy</code>.</p>
<p>To make the command bus claim less of the CPU and allow other threads to do processing, use the <code>YieldingWaitStrategy</code>.</p>
<p>Finally, you can use the <code>SleepingWaitStrategy</code> and <code>BlockingWaitStrategy</code> to allow other processes a fair share of CPU.</p>
<p>The latter is suitable if the Command Bus is not expected to be processing full-time.</p>
<p>Defaults to the <code>BlockingWaitStrategy</code>.</p>
</li>
<li><p><code>Executor</code> - sets the Executor that provides the Threads for the <code>DisruptorCommandBus</code>.</p>
<p>This executor must be able to provide at least four threads.</p>
<p>Three of the threads are claimed by the processing components of the <code>DisruptorCommandBus</code>.</p>
<p>Extra threads are used to invoke callbacks and to schedule retries in case an Aggregate&apos;s state is detected to be corrupt.</p>
<p>Defaults to a <code>CachedThreadPool</code> that provides threads from a thread group called <code>&quot;DisruptorCommandBus&quot;</code>.</p>
</li>
<li><p><code>TransactionManager</code> - defines the transaction manager that should ensure that the storage and publication of events are executed within a transaction.</p>
</li>
<li><p><code>InvokerInterceptors</code> - defines the <code>CommandHandlerInterceptor</code>s that are to be used in the invocation process.</p>
<p>This is the process that calls the actual Command Handler method.</p>
</li>
<li><p><code>PublisherInterceptors</code> - defines the <code>CommandHandlerInterceptor</code>s that are to be used in the publication process.</p>
<p>This is the process that stores and publishes the generated events.</p>
</li>
<li><p><code>RollbackConfiguration</code> - defines on which Exceptions a Unit of Work should be rolled back.</p>
<p>Defaults to a configuration that rolls back on unchecked exceptions.</p>
</li>
<li><p><code>RescheduleCommandsOnCorruptState</code> - indicates whether Commands that have been executed against an Aggregate that has been corrupted (e.g. because a Unit of Work was rolled back) should be rescheduled.</p>
<p>If <code>false</code> the callback&apos;s <code>onFailure()</code> method will be invoked.</p>
<p>If <code>true</code> (the default), the command will be rescheduled instead.</p>
</li>
<li><p><code>CoolingDownPeriod</code> - sets the number of seconds to wait to make sure all commands are processed.</p>
<p>During the cooling down period, no new commands are accepted, but existing commands are processed, and rescheduled when necessary.</p>
<p>The cooling down period ensures that threads are available for rescheduling the commands and calling callbacks.</p>
<p>Defaults to <code>1000</code> (1 second).</p>
</li>
<li><p><code>Cache</code> - sets the cache that stores aggregate instances that have been reconstructed from the Event Store.</p>
<p>The cache is used to store aggregate instances that are not in active use by the disruptor.</p>
</li>
<li><p><code>InvokerThreadCount</code> - the number of threads to assign to the invocation of command handlers.</p>
<p>A good starting point is half the number of cores in the machine.</p>
</li>
<li><p><code>PublisherThreadCount</code> - the number of threads to use to publish events.</p>
<p>A good starting point is half the number of cores, and could be increased if a lot of time is spent on I/O.</p>
</li>
<li><p><code>SerializerThreadCount</code> - the number of threads to use to pre-serialize events.</p>
<p>This defaults to <code>1</code>, but is ignored if no serializer is configured.</p>
</li>
<li><p><code>Serializer</code> - the serializer to perform pre-serialization with.</p>
<p>When a serializer is configured, the <code>DisruptorCommandBus</code> will wrap all generated events in a <code>SerializationAware</code> message.</p>
<p>The serialized form of the payload and metadata is attached before they are published to the Event Store.</p>
<p>tabs 
tab title=&quot;Axon Configuration API&quot; </p>
<pre><code class="lang-java">Configurer configurer = DefaultConfigurer.defaultConfiguration()
          .configureCommandBus(c -&gt;
              DisruptorCommandBus.builder()
                  .transactionManager(c.getComponent(TransactionManager.class))
                  .messageMonitor(c.messageMonitor(DisruptorCommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
                  .bufferSize(<span class="hljs-number">4096</span>)
                  .build() 
          );
</code></pre>
<p>endtab </p>
<p>tab title=&quot;Spring Boot AutoConfiguration&quot; </p>
<pre><code class="lang-java"><span class="hljs-meta">@Bean</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> DisruptorCommandBus <span class="hljs-title">commandBus</span><span class="hljs-params">(TransactionManager txManager, AxonConfiguration axonConfiguration)</span> </span>{
  DisruptorCommandBus commandBus =
          DisruptorCommandBus.builder()
                          .transactionManager(txManager)
                          .messageMonitor(axonConfiguration.messageMonitor(DisruptorCommandBus.class, <span class="hljs-string">&quot;commandBus&quot;</span>))
                          .build();
  commandBus.registerHandlerInterceptor(<span class="hljs-keyword">new</span> CorrelationDataInterceptor&lt;&gt;(axonConfiguration.correlationDataProviders()));
  <span class="hljs-keyword">return</span> commandBus;
}
</code></pre>
<p>endtab 
endtabs </p>
</li>
</ul>
<h2 id="the-command-bus---distributed">The Command Bus - Distributed</h2>
<p>Oftentimes you would want multiple instances of command buses in different JVMs to act as one. 
Commands dispatched on one JVM&apos;s command bus should be seamlessly transported to a command handler in another JVM while sending back any results.
That is where the concept of &apos;distributing the command bus&apos; comes in.</p>
<p>There are a couple of concepts that are configurable, regardless of the type of distributed command bus that is being used:</p>
<h3 id="local-segment">Local Segment</h3>
<p>Unlike the <a href="#the-command-bus---local">local</a> <code>CommandBus</code> implementations, the distributed command buses do not invoke any handlers at all.
All they do is form a &quot;bridge&quot; between command bus implementations on different JVM&apos;s, delegating any received commands to the so-called <em>local segment</em>.</p>
<p>By default, this local segment is the <a href="infrastructure.html#simplecommandbus"><code>SimpleCommandBus</code></a>.
You can configure the local segment to be any of the other local command buses too, like the <a href="infrastructure.html#asynchronouscommandbus"><code>AsynchronousCommandBus</code></a> and <a href="infrastructure.html#disruptorcommandbus"><code>DisruptorCommandBus</code></a>.
The details of how to configure the local segment are shown in the implementation sections.</p>
<h3 id="load-factor">Load Factor</h3>
<p>The load factor defines the amount of load an Axon application would carry compared to other instances.
For example, if you have a two machine set up, each with a load factor of 100, they will both carry an equal amount of load.</p>
<p>Increasing the load factor to 200 on both would still mean that both machines receive the same amount of load.
This points out that the load factor will only change the load amongst systems if the values are not equal.
Doing so would make sense in a heterogeneous application landscape, where the faster machines should deal with a bigger portion of command handling than the slower machines.</p>
<p>The default load factor set for the distributed <code>CommandBus</code> implementations is 100.
The configuration changes slightly per distributed implementation and as such will be covered in those sections.</p>
<h3 id="routing-strategy">Routing Strategy</h3>
<p>Commands should be <a href="../../architecture-overview/#explicit-messaging">routed consistently</a> to the same application, especially those targeted towards a specific Aggregate.
This ensures a single instance is in charge of the targeted aggregate, resolving the concurrent access issue and allowing for optimization like caching to work as designed.
The component dealing with the consistent routing in an Axon application is the <code>RoutingStrategy</code>.</p>
<p>The <code>RoutingStrategy</code> receives a <code>CommandMessage</code> and based on the message returns the routing key to use.
Two commands with the same routing key will <strong>always</strong> be routed to the same segment, as long as there is no topology change in the distributed set-up.</p>
<p>At the moment, there are five implementations of the <code>RoutingStrategy</code>. 
Three of these are intended to be fallback solutions, in case the routing key cannot be resolved:</p>
<ol>
<li>The <code>AnnotationRoutingStrategy</code> - the <strong>default</strong> routing strategy expects the <code>TargetAggregateIdentifier</code> or <code>RoutingKey</code> annotation to be present on a field inside the command class. 
The annotated field or getter is searched, and the contents will be returned as the routing key for that command.</li>
<li>The <code>MetaDataRoutingStrategy</code> - uses a property defined during creation of this strategy to fetch the routing key from the <code>CommandMessage</code>&apos;s <code>MetaData</code>.</li>
<li>The <code>ERROR</code> <code>UnresolvedRoutingKeyPolicy</code> - the <strong>default fallback</strong> that will cause an exception to be thrown when the routing key cannot be resolved from the given <code>CommandMessage</code>.</li>
<li>The <code>RANDOM_KEY</code> <code>UnresolvedRoutingKeyPolicy</code> - will return a random value when a routing key cannot be resolved from the <code>CommandMessage</code>. 
This means that those commands will be routed to a random segment of the command bus.</li>
<li>The <code>STATIC_KEY</code> <code>UnresolvedRoutingKeyPolicy</code> - will return a static key (named &quot;unresolved&quot;) for unresolved routing keys. 
This policy routes all commands to the same segment, as long as the configuration of segments does not change.</li>
</ol>
<p>The <code>AnnotationRoutingStrategy</code> and <code>MetaDataRoutingStrategy</code> are considered the full implementations to configure.
The <code>ERROR</code>, <code>RANDOM_KEY</code> and <code>STATIC_KEY</code> are <em>fallback routing strategies</em> that should be configured on the annotation or meta-data implementations.
To get a grasp how these are constructed, consider the following sample:</p>
<p> tabs 
 tab title=&quot;AnnotationRoutingStrategy&quot; </p>
<pre><code class="lang-java"><span class="hljs-comment">// A custom annotation can be used to drive the AnnotationRoutingStrategy</span>
<span class="hljs-meta">@interface</span> CustomRoutingAnnotation {
}
<span class="hljs-comment">// Constructs a AnnotationRoutingStrategy with a different annotation and fallback: </span>
<span class="hljs-function"><span class="hljs-keyword">public</span> RoutingStrategy <span class="hljs-title">routingStrategy</span><span class="hljs-params">()</span> </span>{
    <span class="hljs-keyword">return</span> AnnotationRoutingStrategy.builder()
                                    .annotationType(CustomRoutingAnnotation.class)
                                    .fallbackRoutingStrategy(UnresolvedRoutingKeyPolicy.STATIC_KEY)
                                    .build();
}
</code></pre>
<p> endtab </p>
<p> tab title=&quot;MetaDataRoutingStrategy&quot; </p>
<pre><code class="lang-java"><span class="hljs-comment">// Constructs a MetaDataRoutingStrategy with the defined meta data key and a different fallback:</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> RoutingStrategy <span class="hljs-title">routingStrategy</span><span class="hljs-params">()</span> </span>{
    <span class="hljs-keyword">return</span> MetaDataRoutingStrategy.builder()
                                  .metaDataKey(<span class="hljs-string">&quot;my-routing-key&quot;</span>)
                                  .fallbackRoutingStrategy(UnresolvedRoutingKeyPolicy.RANDOM_KEY)
                                  .build();
}
</code></pre>
<p> endtab 
 endtabs </p>
<p>Of course, a custom implementation of the <code>RoutingStrategy</code> can also be provided when necessary.
When we need to deviate from the default <code>AnnotationRoutingStrategy</code>, we should configure it like so: </p>
<p> tabs 
 tab title=&quot;Axon Configuration API&quot; </p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">AxonConfig</span> </span>{
    <span class="hljs-comment">// ...  </span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">configureRoutingStrategy</span><span class="hljs-params">(Configurer configurer, YourRoutingStrategy yourRoutingStrategy)</span> </span>{
        configurer.registerComponent(RoutingStrategy.class, config -&gt; yourRoutingStrategy);
    }
}
</code></pre>
<p> endtab </p>
<p> tab title=&quot;Spring Boot AutoConfiguration&quot; </p>
<pre><code class="lang-java"><span class="hljs-meta">@Configuration</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">AxonConfig</span> </span>{
    <span class="hljs-comment">// ...</span>
    <span class="hljs-meta">@Bean</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> RoutingStrategy <span class="hljs-title">routingStrategy</span><span class="hljs-params">()</span> </span>{
        <span class="hljs-keyword">return</span> <span class="hljs-comment">/* construct your routing strategy */</span>;
    }
}
</code></pre>
<p> endtab 
 endtabs </p>
<h3 id="axonservercommandbus">AxonServerCommandBus</h3>
<p>The <code>AxonServerCommandBus</code> is the <em>default</em> distributed <code>CommandBus</code> implementation that is set by the framework.
It connects to <a href="../../axon-server-introduction.html">AxonServer</a>, with which it can send and receive commands.</p>
<p>As it is the default, configuring it is relatively straightforward:</p>
<p> tabs 
 tab title=&quot;Axon Configuration API&quot; 
Declare dependencies:</p>
<pre><code class="lang-text">&lt;!-- somewhere in the POM file... --&gt;
&lt;dependencyManagement&gt;
    &lt;!-- amongst the dependencies... --&gt;
    &lt;dependencies&gt;
        &lt;dependency&gt;
            &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
            &lt;artifactId&gt;axon-bom&lt;/artifactId&gt;
            &lt;version&gt;${version.axon}&lt;/version&gt;
            &lt;type&gt;pom&lt;/type&gt;
            &lt;scope&gt;import&lt;/scope&gt;
        &lt;/dependency&gt;
    &lt;/dependencies&gt;
    &lt;!-- ... --&gt;
&lt;/dependencyManagement&gt;
&lt;!-- ... --&gt;
&lt;dependencies&gt;
    &lt;!-- amongst the dependencies... --&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
        &lt;artifactId&gt;axon-server-connector&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;dependency&gt;
        &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
        &lt;artifactId&gt;axon-configuration&lt;/artifactId&gt;
    &lt;/dependency&gt;
    &lt;!-- ... --&gt;
&lt;/dependencies&gt;
</code></pre>
<p>Configure your application:</p>
<pre><code class="lang-java"><span class="hljs-comment">// The AxonServerCommandBus is configured as Command Bus by default when constructing a DefaultConfigurer.</span>
Configurer configurer = DefaultConfigurer.defaultConfiguration();
</code></pre>
<p> endtab </p>
<p> tab title=&quot;Spring Boot AutoConfiguration&quot; 
By simply including the <code>axon-spring-boot-starter</code> dependency, Axon will automatically configure the <code>AxonServerCommandBus</code>:</p>
<pre><code class="lang-text">&lt;!--somewhere in the POM file--&gt;
&lt;dependency&gt;
    &lt;groupId&gt;org.axonframework&lt;/groupId&gt;
    &lt;artifactId&gt;axon-spring-boot-starter&lt;/artifactId&gt;
    &lt;version&gt;${axon.version}&lt;/version&gt;
&lt;/dependency&gt;
</code></pre>
<p> endtab 
 endtabs </p>
<blockquote>
<p><strong>Disabling Axon Server</strong></p>
<p>There are two options to disable Axon Framework&apos;s default of using the <code>AxonServerCommandBus</code>:</p>
<ol>
<li>By excluding the <code>axon-server-connector</code> dependency.</li>
<li>By setting <code>axon.server.enabled</code> to <code>false</code> when Spring Boot is used.</li>
</ol>
<p>When doing any of these, Axon will fallback to the <strong>un</strong>distributed <a href="infrastructure.html#simplecommandbus"><code>SimpleCommandBus</code></a>, unless configured otherwise.</p>
</blockquote>
<h4 id="local-segment-and-load-factor-configuration">Local Segment and Load Factor Configuration</h4>
<p>The <a href="#load-factor">load factor</a> for the <code>AxonServerCommandBus</code> is defined through the <code>CommandLoadFactorProvider</code>.
This interface allows us to distinguish between commands to, for example, use a different load factor per command message.
This might be useful if some commands are routed more often towards one instance in favour of the other.</p>
<p>The following should be done to configure a custom <a href="#local-segment">local segment</a> and/or load factor:</p>
<p> tabs 
 tab title=&quot;Axon Configuration API&quot; </p>
<pre><code class="lang-java"><span class="hljs-comment">// Somewhere in the configuration class</span>
<span class="hljs-function"><span class="hljs-keyword">public</span> CommandBus <span class="hljs-title">axonServerCommandBus</span><span class="hljs-params">(CommandBus localSegment,
                                       CommandLoadFactorProvider loadFactorProvider,
                                       ...)</span> </span>{
    <span class="hljs-keyword">return</span> AxonServerCommandBus.builder()
                               .localSegment(localSegment)
                               .targetContextResolver(targetContextResolver)
                               <span class="hljs-comment">// All required configuration components are specified in the JavaDoc of the Builder</span>
                               .build();
}
</code></pre>
<p> endtab </p>
<p> tab title=&quot;Spring Boot AutoConfiguration&quot; </p>
<pre><code class="lang-java"><span class="hljs-meta">@Configuration</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">AxonConfig</span> </span>{
    <span class="hljs-comment">// The Qualifier annotation specifying &quot;localSegment&quot; will make this CommandBus the local segment </span>
    <span class="hljs-meta">@Bean</span>
    <span class="hljs-meta">@Qualifier</span>(<span class="hljs-string">&quot;localSegment&quot;</span>)
    <span class="hljs-function"><span class="hljs-keyword">public</span> CommandBus <span class="hljs-title">localSegment</span><span class="hljs-params">()</span> </span>{

        <span class="hljs-keyword">return</span> <span class="hljs-comment">/* construct your local segment */</span>;
    }

    <span class="hljs-meta">@Bean</span>
    <span class="hljs-function"><span class="hljs-keyword">public</span> CommandLoadFactorProvider <span class="hljs-title">loadFactorProvider</span><span class="hljs-params">()</span> </span>{
      <span class="hljs-keyword">return</span> <span class="hljs-comment">/* construct your load factor provider */</span>;
    }
}
</code></pre>
<p> endtab 
 endtabs </p>
<h3 id="distributedcommandbus">DistributedCommandBus</h3>
<p>The alternative to the <a href="#axonservercommandbus"><code>AxonServerCommandBus</code></a> is the <code>DistributedCommandBus</code>.
Each instance of the <code>DistributedCommandBus</code> on each JVM is referred to as a &quot;Segment&quot;.</p>
<p><img src="../../.gitbook/assets/distributed-command-bus.png" alt="Structure of the Distributed Command Bus"></p>
<p>The <code>DistributedCommandBus</code> relies on two components: </p>
<ol>
<li>The <code>CommandBusConnector</code> - implements the communication protocol between the JVM&apos;s to send the command over the wire and to receive the response. </li>
<li>The <code>CommandRouter</code> - chooses the destination for each incoming command.
It defines which segment of the <code>DistributedCommandBus</code> should be given a command, based on a routing key calculated by the <a href="#routing-strategy">routing strategy</a>.</li>
</ol>
<p>You can choose different flavors of these components that are available as extension modules.
Currently, Axon provides two extensions to that end, which are:</p>
<ol>
<li>The <a href="../../extensions/spring-cloud.html">SpringCloud</a> extension </li>
<li>The <a href="../../extensions/jgroups.html">JGroups</a> extension</li>
</ol>
<p>Configuring a distributed command bus can (mostly) be done without any modifications in configuration files.
The most straightforward approach to this is to include the Spring Boot starter dependency of either the Spring Cloud or JGroups extension.
With that in place, a single property needs to be added to the application context, to enable the <code>DistributedCommandBus</code>:</p>
<pre><code class="lang-text">axon.distributed.enabled=true
</code></pre>
<p>It is recommended to visit the respective extension pages on how to configure JGroups or Spring Cloud for the <code>DistributedCommandBus</code>.</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="command-handlers.html" class="navigation navigation-prev " aria-label="Previous page: Command Handlers">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="configuration.html" class="navigation navigation-next " aria-label="Next page: Configuration">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"Infrastructure","level":"3.3.4","depth":2,"next":{"title":"Configuration","level":"3.3.5","depth":2,"path":"axon-framework/axon-framework-commands/configuration.md","ref":"axon-framework/axon-framework-commands/configuration.md","articles":[]},"previous":{"title":"Command Handlers","level":"3.3.3","depth":2,"path":"axon-framework/axon-framework-commands/command-handlers.md","ref":"axon-framework/axon-framework-commands/command-handlers.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"axon-framework/axon-framework-commands/infrastructure.md","mtime":"2021-09-13T08:33:06.204Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-09-13T08:33:36.904Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

